function  run_clustering(datasetsAio, candiAlgs)
if ~exist('datasets', 'var') || isempty(datasets)
    % datasets = {'test'};

 datasetsAio ={ 'bbcnewssport_737n_1000d_5c_uni_12k','RELATHE_1427n_4322d_2c_tfidf_uni_12k',...
    'warpPIE10P_210n_2420d_10c_12k','COIL20_1440n_1024d_20c_uni_12k',...
    'UMIST_575n_644d_20c_12k','BASEHOCK_1993n_4862d_2c_tfidf_uni_12k',...
     'leukemia_72n_7070d_2c_12k','ALLAML_72n_7129d_2c_12k',...   
};
end
if ~exist('candiAlgs', 'var') || isempty(candiAlgs)
     candiAlgs = {'coreg', 'crsc','amkkc', 'jmksc', 'lkamkc',...
    'lkgr', 'mkkmmr','onmkc','rmkkm','rmsc'};
end

for ids = 1:length(candiAlgs)
          candiAlg= candiAlgs{ids};
          acc_rmkkm_res = [];
          acc_amkkc_res=[];
           acc_mkkmmr_res = [];
           acc_lkamkc_res = [];
           acc_onmkc_res = [];
           acc_lkgr_res = [];
           acc_jmksc_res = [];
           nmi_rmkkm_res = [];
           nmi_mkkmmr_res = [];
           nmi_lkamkc_res = [];
          nmi_onmkc_res = [];
            nmi_amkkc_res=[];
          nmi_lkgr_res = [];
          nmi_jmksc_res = [];
          purity_rmkkm_res = [];
          purity_mkkmmr_res = [];
          purity_lkamkc_res = [];
          purity_onmkc_res = [];
          purity_lkgr_res = [];
          purity_jmksc_res = [];
          purity_amkkc_res=[];
     for id = 1:length(datasetsAio)
         dataset = datasetsAio{id};
          fname = [dataset,'_', candiAlg,'_multi_kernel.mat'];
          load(fullfile(pwd,'result',fname));
          switch lower(candiAlg)
               case lower('rmkkm') 
                    gammas = [0.1:0.1:0.9]; % local regularization
                    resAio = zeros(9, 1);
                    for i1 = 1:length(gammas)      
                         resAio(i1,1)=gammas(i1);
                    end
                     
                    [maxcols weizhi]=max(res_rmkkm_aio,[],1);
                   
                        acc_rmkkm_res=[acc_rmkkm_res; resAio(weizhi(1),:)];  
                        nmi_rmkkm_res=[nmi_rmkkm_res; resAio(weizhi(2),:)];  
                        purity_rmkkm_res=[purity_rmkkm_res; resAio(weizhi(3),:)];  
                    save(['rmkkm_res.mat'],'resAio','nmi_rmkkm_res','purity_rmkkm_res','acc_rmkkm_res');
                case lower('amkkc') 
                    lambdas = [1.0:0.1:2.0]; % local regularization
                    resAio = zeros(11, 1);
                    for i1 = 1:length(lambdas)      
                         resAio(i1,1)=lambdas(i1);
                    end
                    [maxcols weizhi]=max(res_amkkc_aio,[],1);
                        acc_amkkc_res=[acc_amkkc_res; resAio(weizhi(1),:)];  
                        nmi_amkkc_res=[nmi_amkkc_res; resAio(weizhi(2),:)];  
                        purity_amkkc_res=[purity_amkkc_res; resAio(weizhi(3),:)];  
                    save(['amkkc_res.mat'],'resAio','acc_amkkc_res','nmi_amkkc_res','purity_amkkc_res');
               case lower('mkkmmr')
                    
                    lambdas = 2.^[-15:15]; % local regularization
                    resAio= zeros(31, 1);
                    for i1 = 1:length(lambdas)      
                         resAio(i1,1)=lambdas(i1);
                    end
                    [maxcols weizhi]=max(res_mkkmmr_aio,[],1);
                      acc_mkkmmr_res=[acc_mkkmmr_res; resAio(weizhi(1),:)];  
                        nmi_mkkmmr_res=[nmi_mkkmmr_res; resAio(weizhi(2),:)];  
                        purity_mkkmmr_res=[purity_mkkmmr_res; resAio(weizhi(3),:)];  
                  
                    save(['mkkmmr_res.mat'],'resAio','acc_mkkmmr_res','nmi_mkkmmr_res','purity_mkkmmr_res');
               case lower('lkamkc') 
                    tauset = [0.1:0.1:1];
                    lambdaset = 2.^[-15:1:15];
                    resAio= zeros(310, 2);
                    for i1 = 1:length(tauset) 
                         for i2 = 1:length(lambdaset) 
                             a=(i1-1)*31+i2;
                             resAio(a,:)=[tauset(i1) lambdaset(i2)];
                         end
                    end
                     [maxcols weizhi]=max(res_lkamkc_aio,[],1);
                          acc_lkamkc_res=[acc_lkamkc_res; resAio(weizhi(1),:)];  
                        nmi_lkamkc_res=[nmi_lkamkc_res; resAio(weizhi(2),:)];  
                        purity_lkamkc_res=[purity_lkamkc_res; resAio(weizhi(3),:)];   
                    save(['lkamkc_res.mat'],'resAio','acc_lkamkc_res','nmi_lkamkc_res','purity_lkamkc_res');
               case lower('onmkc')
                          rhos = 2.^[-15:2:15];
                     lambdas = 2.^[-15:2:15];
                    resAio = zeros(256, 2);
                    for i1 = 1:length(rhos) 
                         for i2 = 1:length(lambdas) 
                             a=(i1-1)*16+i2;
                             resAio(a,:)=[rhos(i1) lambdas(i2)];
                         end
                    end
                  [maxcols weizhi]=max(res_onmkc_aio,[],1);
                          acc_onmkc_res=[acc_onmkc_res; resAio(weizhi(1),:)];  
                        nmi_onmkc_res=[nmi_onmkc_res; resAio(weizhi(2),:)];  
                        purity_onmkc_res=[purity_onmkc_res; resAio(weizhi(3),:)];   
                    save(['onmkc_res.mat'],'resAio','acc_onmkc_res','nmi_onmkc_res','purity_onmkc_res');
               case lower('lkgr')
                   
                    alphas = 10.^[-5:2:5]; % trade-off
                    betas = 10.^[-5:2:5]; % local regularization
                    gammas = 10.^[-5:2:5];
                    resAio = zeros(216, 3);
                    for i1 = 1:length(alphas)
                      for i2 = 1:length(betas)
                         for i3 = 1:length(gammas)
                             a=(i1-1)*36+(i2-1)*6+i3;
                             resAio(a,:)=[alphas(i1) betas(i2) gammas(i3)];
                         end
                      end
                    end
                 [maxcols weizhi]=max(res_lkgr_aio,[],1);
                         acc_lkgr_res=[acc_lkgr_res; resAio(weizhi(1),:)];  
                        nmi_lkgr_res=[nmi_lkgr_res; resAio(weizhi(2),:)];  
                        purity_lkgr_res=[purity_lkgr_res; resAio(weizhi(3),:)];    
      
                   save(['lkgr_res.mat'],'resAio','acc_lkgr_res','nmi_lkgr_res','purity_lkgr_res');
               case lower('jmksc')
                   
                    alphas = 10.^[-4:1:1]; % trade-off
                    betas = [1,5,10,15,20,25,30]; % local regularization
                    gammas = [0.1,1,5,10,15,20,25,30];
                    resAio= zeros(336, 3);
                    for i1 = 1:length(alphas)
                      for i2 = 1:length(betas)
                         for i3 = 1:length(gammas)
                             a=(i1-1)*56+(i2-1)*8+i3;
                             resAio(a,:)=[alphas(i1) betas(i2) gammas(i3)];
                         end
                      end
                    end
                    [maxcols weizhi]=max(res_jmksc_aio,[],1);
                        acc_jmksc_res=[acc_jmksc_res; resAio(weizhi(1),:)];  
                        nmi_jmksc_res=[nmi_jmksc_res; resAio(weizhi(2),:)];  
                        purity_jmksc_res=[purity_jmksc_res; resAio(weizhi(3),:)];    
                   save(['jmksc_res.mat'],'resAio','acc_jmksc_res','nmi_jmksc_res','purity_jmksc_res');
             
               case lower('onmkcf_sym_nn')   
                    lambdas = 2.^[-5:5]; % trade-off
                    gammas = 2.^[-5:5]; % local regularization
                     % trade-off 
                    resAio = zeros(121, 2);
                    for i1 = 1:length(lambdas)
                      for i2 = 1:length(gammas)
                             a=(i1-1)*11+i2;
                             resAio(a,:)=[lambdas(i1) gammas(i2)];                     
                      end
                    end
                    [maxcols weizhi]=max(res_onmkcf_sym_aio,[],1);
                        acc_onmkcf_res=[acc_onmkcf_res; resAio(weizhi(1),:)];  
                        nmi_onmkcf_res=[nmi_onmkcf_res; resAio(weizhi(2),:)];  
                        purity_onmkcf_res=[purity_onmkcf_res; resAio(weizhi(3),:)];    
                   save(['onmkcf_res.mat'],'resAio','acc_onmkcf_res','nmi_onmkcf_res','purity_onmkcf_res');
          end
          
     end     
    
end
        
end